package com.dongdongshop.api;

import com.dongdongshop.common.Result;
import com.dongdongshop.dto.GoodsDTO;
import com.dongdongshop.dto.ItemDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("dongdongshop-goods-service")
public interface GoodsServiceApi {
    @PostMapping("/goods/getById")
    Result<GoodsDTO> getById(Long id);
    @PostMapping("/item/getItemById")
    Result<ItemDTO> getItemById(@RequestParam Long itemId);
    //扣减库存
    @PostMapping("/item/subStockCount")
    Result<ItemDTO> subStockCount(@RequestBody List<ItemDTO> itemVOList);
}
